package com.shawn.spring.boot.flowable.mapper;

import com.shawn.spring.boot.flowable.bo.Role;
import com.shawn.spring.boot.flowable.entity.RoleEntity;
import org.springframework.stereotype.Component;

@Component
public class RoleEntityBOMapper {

  public RoleEntity toRoleEntity(Role role) {
    return RoleEntity.builder()
        .code(role.getRole().getCode())
        .name(role.getRole().name())
        .id(role.getId())
        .build();
  }
}
